package com.santoker.user.service.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.santoker.user.service.component.MybatisRedisCache;
import com.santoker.user.service.model.UserRecordDetail;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * <p>
 * 用户记录详情表 Mapper 接口
 * </p>
 *
 * @author Jiangs
 */
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface UserRecordDetailMapper extends BaseMapper<UserRecordDetail> {

    /**
     * 根据记录ID，查询记录详情列表
     *
     * @param recordId 记录ID
     * @return
     */
    List<UserRecordDetail> getListByRecordId(@Param("recordId") Integer recordId);

    /**
     * 查询记录详情
     *
     * @param recordId 记录ID
     * @param tNode    节点
     * @return
     */
    UserRecordDetail getDetailByRecordIdAndTNode(@Param("recordId") Integer recordId,
                                                 @Param("tNode") String tNode);

}
